Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-10076

Fix string codepoint detection

    XMLWordPrintableJSON

Details

    Description

      GIVEN a PdxSerializable implementation with a string field
      WHEN an ASCII string is written
      THEN the string is serialized with the DSCode CacheableString


      Additional information. In the Java client, whenever writing an string, the string is parsed and the DSCode is assigned depending on the string codification. In the native client, it's always set to CacheableString, whenever for example in the case of an ASCII string should be CacheableASCIIString

      Also I've noticed the following scenario requires to fix the codepoint detection:

      1. From a native client, I create an object using a PdxSerializable implementation, which has an String field.
      2. After that, we are reading this object from a java client which cache has readPdxSerialized=true and comparing it with a PdxInstance created locally inside the Java client.
      3. As PdxInstanceImpl.equals method uses rawBytes for strings, if the string is serialized using different DSCodes, the comparison will fail, even if the length and content are the same.

      Attachments

        Issue Links

          Activity

            People

              alberto.gomez Alberto Gomez
              gaussianrecurrence Mario Salazar de Torres
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: